/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

import interfaces.RemoteActionInterface;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;

/**
 *
 * @author Jeppe
 */
public class RemoteAction extends UnicastRemoteObject implements RemoteActionInterface {

    private String command;
    private Object object;
    private int code;

    public RemoteAction(String command, int code) throws RemoteException {
        this.command = command;
        this.code = code;
    }

    public RemoteAction(String command, Object object, int code) throws RemoteException {
        this.command = command;
        this.object = object;
        this.code = code;
    }

    @Override
    public String getCommand() throws RemoteException {
        return command;
    }

    @Override
    public Object getSource() throws RemoteException {
        return object;
    }

    @Override
    public int getCode() throws RemoteException {
        return code;
    }

}
